import request from "@/utils/request";
import { Result } from "./type/globale";
import { HospitalLevelRegion, hospitalResponse, SearchHosname } from "./type/home";

//获取医院数据列表
export const getHospitalListAPI=(page:number,limit:number,hosType:string,districtCode:string)=>request.get<any,Result<hospitalResponse>>(`/hosp/hospital/${page}/${limit}?hostype=${hosType}&districtCode=${districtCode}`)

//获取医院等级与地区数据
export const getHospitalLevelRegionAPI=(dictCode:string)=>request.get<any,Result<HospitalLevelRegion>>(`/cmn/dict/findByDictCode/${dictCode}`)

//搜索框获取医院名称
export const getSearchHosnameAPI=(hosname:string)=>request.get<any,Result<SearchHosname>>(`/hosp/hospital/findByHosname/${hosname}`)